import request from '../utils/request'

export const getCode = (data) => {
    return request.post('/get/code', data)
}

//注册接口

export const userAuthentication = (data) => {
    return request.post('/user/authentication', data)
}

//登录接口

export const login = (data) => {
    return request.post('/login', data)
}

export const authAdmin = (params) => {
    return request.get('/auth/admin',{params} )
}


//菜单权限接口

export const userGetMenu = () => { 
    return request.get('/user/getmenu')
}

//权限修改
export const userSetMenu = (data) => {
    return request.post('/user/setmenu', data)
}

//菜单列表
export const menuList = (params) => {
    return request.get('/menu/list',{params} )
}

export const menuSelectList = () => {
    return request.get('/menu/selectlist' )
}

// 用户数据修改

export const updateUser = (data) => {
    return request.post('/update/user', data)
}

//用户菜单

export const menuPermissions = () => {
    return request.get('/menu/permissions' )
}

//陪护师头像列表

export const photoList = () => {
    return request.get('/photo/list/' )
}

//陪护师创建

export const companion = (data) => {
    return request.post('/companion', data)
}

//陪护列表

export const companionList = (params) => {
    return request.get('/companion/list/',{params} )
}

//删除陪护师

export const deleteCompanion = (data) => {
    return request.post('/delete/companion', data)
}

//订单列表

export const adminOrder = (params) => {
    return request.get('/admin/order/',{params} )
}


//服务状态改变

export const updateOrder = (data) => {
    return request.post('/update/order', data)
}